﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="BSCMFF.Web.Pages.UserListMoore" %>
<%--<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="BSCMFF.Web.Pages.UserList1" %>--%>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" RestoreOriginalRenderDelegate="false">

    <telerik:RadGrid ID="RadGrid1" runat="server" 
        AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" 
        DataSourceID="EntityDataSourceUsers" GridLines="None" 
        
        oninsertcommand="RadGrid1_InsertCommand" 
        onupdatecommand="RadGrid1_UpdateCommand" 
        ondeletecommand="RadGrid1_DeleteCommand" 
         onitemcommand="RadGrid1_ItemCommand" 
        >
         <%--onselectedindexchanged="RadGrid1_SelectedIndexChanged1"--%>

        <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" EditMode="EditForms" CommandItemDisplay="Bottom"
            DataSourceID="EntityDataSourceUsers">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <Columns>
                    <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" 
                        HeaderText="ID" ReadOnly="True" SortExpression="User_ID" 
                        UniqueName="User_ID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Login" HeaderText="Login" 
                        SortExpression="Login" UniqueName="Login">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Password" HeaderText="Password" 
                        SortExpression="Password" UniqueName="Password">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Role.Name" HeaderText="Role" 
                        SortExpression="Role.Name" UniqueName="Role.Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn CommandName="Select" Text="Select" 
                        UniqueName="column">
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UserControls/Details/UserDetails.ascx" >
                </EditFormSettings>
                
               
        </MasterTableView>
        <HeaderContextMenu EnableAutoScroll="True">
        </HeaderContextMenu>
    </telerik:RadGrid>

</telerik:RadAjaxPanel>

    <asp:EntityDataSource ID="EntityDataSourceUsers" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableDelete="True" EnableFlattening="False" EnableInsert="True" 
        EnableUpdate="True" EntitySetName="Users" Include="Role">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="EntityDataSourceRoles" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableFlattening="False" EntitySetName="Roles">
    </asp:EntityDataSource>
</asp:Content>
